import request from '@/utils/request'
import store from '@/store/index'

export function adminStatistic() {
  return request({
    url: '/count/sum/all'
  })
}

export function ageStatisticByCampus(campusId) {
  return request({
    url: '/count/count/cam/age',
    method: 'get',
    params: {
      camId: campusId
    }
  })
}

export function eduStatisticByCampus(campusId) {
  return request({
    url: '/count/count/cam/edu',
    method: 'get',
    params: {
      camId: campusId
    }
  })
}

export function orderStatisticByCampus(campusId) {
  return request({
    url: '/count/Campus/allMoney',
    method: 'get',
    params: {
      camId: campusId
    }
  })
}

export function allOrderStatisticByRecommend() {
  return request({
    url: '/count/referenceId/allOrders',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}

export function directOrderStatisticByRecommend() {
  return request({
    url: '/count/referenceId/allNoStageOrders',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}

export function stageOrderStatisticByRecommend() {
  return request({
    url: '/count/referenceId/allStageOrders',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}

export function shareRatio() {
  return request({
    url: '/count/countMoney/All/shareRatio',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}

export function referenceRatio() {
  return request({
    url: '/count/countMoney/referenceRatio',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}

export function conditionSearch() {
  return request({
    url: '/count/countMoney/referenceRatio',
    method: 'get',
    params: {
      referenceId: store.getters.token
    }
  })
}
